<?php 
$appid='wxdf0eee3a5e4ad06a';
$secet='Ih5QhYYETTBqf7uANRkYX5LEW2RvtW';
$url='https://onex002.onex.im/cgi-bin/token?grant_type=client_credential&appid='.$appid.'&secret='.$secet;
$getToken=json_decode(file_get_contents($url),true);
$thisToken=$getToken['access_token'];
 
  
 
$url='https://onex002.onex.im/cgi-bin/message/custom/send?access_token='.$thisToken;

echo $url;

$data='{
		  "touser":"oj20C1cXI_xN6Pn5qrAHJHM0ja2s",
		  "msgtype":"wxcard",
		  "wxcard":
		  {
		   "card_id":"pj20C1V059UNmA6UQ8w4OwT4r6jI"
		   }
		}';
$res = json_decode(http_request($url, $data), true);

var_dump($res);
function http_request($url, $data = null)
{
	$curl = curl_init();
	curl_setopt($curl, CURLOPT_URL, $url);
	curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
	curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
	if (!empty($data)){
		curl_setopt($curl, CURLOPT_POST, 1);
		curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
	}
	curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
	$output = curl_exec($curl);
	curl_close($curl);
	return $output;
}
